package prolog.kernel;

import prolog.logic.*;


class Wam5 implements Stateful {
static short[] code={
-6890,
20199,
-31301,
-30430,
-13236,
3730,
15689,
-6731,
-18472,
2967,
5386,
-5684,
-5653,
-11783,
-18492,
-11578,
26072,
20336,
-21902,
-16163,
-13700,
636,
31379,
-16253,
-22459,
28526,
-5550,
-4667,
18452,
-16930,
-958,
-22025,
18513,
22159,
27802,
30059,
38,
24742,
-2847,
18459,
-6516,
1869,
4583,
-12990,
7143,
515,
3585,
-6172,
-18359,
3020,
-25058,
19256,
26620,
-19414,
-17224,
6960,
-29666,
17697,
-6873,
-18510,
-6112,
-15522,
10380,
16335,
13837,
10431,
-9589,
14578,
-8625,
-15091,
-22251,
-7732,
8830,
-23090,
10461,
-15664,
-10401,
-27848,
22519,
-11141,
14071,
21509,
23632,
-20199,
-24981,
-24323,
27266,
11604,
-24449,
-22110,
-16971,
-24619,
21491,
32141,
-5595,
-9221,
-3622,
-20195,
12634,
15087,
-32212,
-14997,
27783,
28459,
14092,
1299,
-18314,
-17772,
25724,
-32245,
-10426,
32554,
-15115,
-5768,
31694,
4115,
-19852,
-971,
-18725,
23694,
28559,
25770,
-13192,
15927,
25093,
17438,
-26342,
4777,
-22600,
-5398,
13665,
-4156,
6630,
26998,
-27171,
17246,
-22558,
29031,
31236,
-24428,
-31991,
26032,
-8664,
28676,
17700,
7597,
15545,
20321,
27846,
-9834,
5805,
-32180,
-31899,
-30056,
-10223,
-10639,
31089,
18865,
-17410,
13964,
4271,
15178,
-5805,
32554,
11919,
9688,
-2328,
5441,
-9433,
31820,
12200,
-14811,
-5645,
-6472,
22840,
-24484,
16972,
-6423,
22025,
-7407,
-19877,
12530,
16919,
-27050,
-2025,
19591,
3236,
-9978,
-11321,
-11694,
12968,
9811,
-9220,
-12582,
-32513,
20616,
-3651,
20331,
16495,
-5960,
-10803,
-4332,
26398,
-27034,
1588,
-4853,
2770,
-5426,
-18288,
-31340,
24420,
22968,
-17218,
-22977,
-8619,
345,
11107,
-32295,
-28425,
-26329,
17644,
-21085,
5646,
-18157,
-20133,
-13976,
-348,
-26987,
-12572,
-17526,
6795,
31605,
9076,
-13867,
-11371,
18853,
-2829,
10306,
29137,
-30790,
-25425,
-17952,
-28434,
22721,
23805,
24509,
1507,
-25566,
-12398,
11801,
-23926,
685,
14362,
2608,
30538,
7007,
-16021,
17371,
-17057,
22863,
-19795,
11386,
-5879,
-9776,
23425,
-3951,
30612,
-18483,
6163,
-8709,
29331,
-27438,
32358,
14018,
31703,
18213,
-2511,
16438,
19683,
-4610,
542,
12725,
32185,
20669,
-21538,
-18671,
17912,
-26195,
-19291,
-15496,
-27824,
-11120,
-5846,
-7267,
-5725,
28749,
-13643,
2257,
-31745,
10840,
-10705,
10,
-30624,
-29926,
-9283,
14804,
57,
3999,
-20094,
15513,
-13314,
-9869,
-26683,
-26785,
7998,
-24334,
28921,
17792,
-17736,
9377,
13685,
-10738,
-11403,
-18600,
18200,
-6466,
20246,
-14185,
-24397,
-6071,
-1829,
13388,
28519,
15507,
-12081,
-25909,
-20261,
10121,
2059,
-10128,
-22276,
-12385,
7314,
-5295,
-17956,
24326,
-896,
18036,
30747,
14661,
-4353,
3864,
17366,
22661,
26666,
10091,
-14434,
-17995,
531,
23714,
15394,
-15907,
15501,
-31125,
-15675,
1727,
-17088,
29884,
-20042,
-31591,
-11997,
-17455,
-19798,
664,
7183,
-16871,
24273,
-17162,
27578,
11034,
22280,
21789,
-17854,
-8339,
-28233,
-20191,
-4637,
111,
9034,
-6793,
-21332,
-22800,
26352,
-23670,
25743,
-19007,
5131,
-3493,
6086,
-24036,
-17837,
-29398,
1983,
-16995,
3340,
-3139,
5015,
-20446,
6825,
23576,
-1596,
-31665,
-11059,
30583,
12871,
30018,
-30448,
22410,
-8933,
3676,
-28873,
-4034,
12837,
-27892,
10055,
27798,
28084,
-10900,
-24056,
17982,
-7567,
-9868,
24226,
-19638,
7216,
31190,
22289,
-23005,
-21866,
-856,
15591,
-3813,
15230,
22597,
31960,
20646,
-8482,
23948,
24479,
-26610,
12233,
30390,
11264,
-11583,
-4308,
31307,
-22671,
6326,
19245,
-5071,
17529,
28768,
-31036,
-27011,
-21523,
29751,
14290,
24755,
8852,
8803,
25829,
-25971,
14526,
-3707,
-18259,
32317,
18041,
17298,
-4140,
27193,
17712,
25082,
21142,
-11304,
-10651,
5814,
17247,
-30685,
-2826,
27110,
3560,
23357,
-12643,
-5845,
-28863,
27856,
19782,
-3978,
22336,
14575,
-22077,
14008,
27754,
13340,
25094,
29628,
-14614,
3028,
-31283,
-22824,
24,
-30677,
5283,
-26448,
16051,
4128,
-16794,
10027,
9734,
-3434,
-30896,
26980,
-31198,
21265,
31192,
-25095,
-21552,
21606,
-19535,
31189,
-2687,
-5741,
2309,
28880,
24992,
5540,
21972,
-1718,
-6407,
11661,
-31343,
-83,
21319,
-13247,
7962,
4978,
-7863,
-2749,
-25618,
24035,
6126,
-9214,
22866,
9462,
10870,
-22743,
-5928,
12942,
22368,
-13501,
-28916,
-5095,
23431,
4354,
4083,
-13810,
-11542,
23754,
-7618,
-18066,
25148,
-16995,
-12595,
30011,
4380,
5125,
-11774,
-25263,
6505,
-4653,
-18051,
27370,
9187,
3622,
24869,
31855,
10874,
4339,
-1643,
3250,
8172,
-17061,
18854,
-3904,
3386,
13279,
17136,
29940,
-1203,
-16294,
-18065,
-6634,
29303,
29442,
-3313,
11015,
-16790,
1205,
21074,
3392,
24490,
-7799,
-8142,
11395,
-20731,
21780,
13264,
28308,
-26153,
27546,
-29941,
11165,
11657,
-18334,
-386,
-26203,
-8537,
-625,
32408,
-18054,
28809,
-15798,
15137,
15996,
-6974,
-9058,
20295,
6157,
-1129,
-18358,
21671,
32310,
-28630,
-10101,
8827,
190,
14690,
28836,
-18547,
20129,
4952,
21335,
18568,
20488,
9819,
-18445,
-7901,
10380,
-9978,
-1605,
-28075,
30387,
7226,
-17845,
-7764,
-13659,
23286,
-13832,
28506,
3641,
-4114,
-2189,
-4096,
-14167,
3368,
-6629,
1528,
30517,
-12690,
-25966,
-11320,
10962,
-5207,
-17998,
-861,
8508,
24567,
-30662,
-6620,
-7500,
24109,
-31976,
21821,
-29411,
15460,
-4130,
-17496,
-2788,
19272,
8229,
-24398,
18469,
30231,
27425,
-26618,
-18541,
31177,
-17110,
-17484,
19541,
-10669,
10401,
-18616,
6999,
-4635,
19802,
-11694,
4423,
5475,
23377,
-10889,
17480,
19687,
-422,
-25891,
-8211,
-26937,
28791,
-11594,
9466,
16822,
-10293,
-675,
-25066,
17668,
1775,
-17145,
14002,
2841,
31900,
24397,
-21760,
-7472,
-6283,
16142,
-12811,
-24661,
-12207,
9810,
-30653,
-9150,
-3151,
-4457,
-26082,
32007,
-3583,
-23383,
-19508,
-16150,
-22927,
-9618,
24454,
-26349,
-11307,
23754,
-20669,
-682,
7154,
-3602,
-32091,
-21255,
17713,
-21974,
-17217,
-5015,
-27192,
-14129,
29647,
7730,
-15301,
20606,
6734,
8354,
-22250,
-12347,
1368,
-2187,
7124,
-32297,
5201,
5826,
17517,
-17114,
-12851,
6817,
-17665,
-30863,
7957,
-13827,
-16427,
-10255,
1952,
-32277,
4051,
26853,
30461,
20910,
-19239,
-4695,
-28685,
10636,
-30431,
26077,
32391,
21522,
1724,
15956,
7647,
20639,
-5962,
-3717,
16866,
-32618,
1112,
-593,
-8260,
25006,
28631,
16799,
32512,
19264,
14830,
-27743,
20930,
21547,
-16538,
19799,
-15651,
-24798,
-4309,
-13314,
-25980,
2240,
3416,
5228,
-32205,
-16565,
16018,
19791,
26556,
-27444,
-29067,
3558,
-25085,
5960,
-17466,
24685,
29204,
3061,
-18381,
-4065,
-25293,
-931,
-28976,
3604,
6521,
143,
15143,
-5994,
-32521,
-12676,
-28233,
5433,
17486,
28475,
8118,
19833,
-22636,
2873,
-2945,
-18913,
-4639,
10133,
-25817,
32215,
1340,
-550,
16392,
-9170,
26537,
19714,
-14631,
12227,
3859,
-14155,
-8465,
-27186,
23810,
-2066,
12311,
20823,
3580,
-11187,
2504,
10126,
-18348,
16084,
-20126,
10763,
6570,
30886,
-29366,
-12389,
25759,
17777,
-1273,
-7902,
25543,
-15949,
-18146,
29795,
12274,
-3073,
20841,
24052,
15872,
-20346,
-24512,
26054,
11001,
-287,
31402,
24516,
-29836,
-24834,
-30804,
22768,
990,
3911,
16045,
4190,
-12231,
-4043,
-1162,
-32101,
-30992,
-30723,
6482,
6610,
28718,
-8523,
26752,
8904,
-19098,
29611,
-18483,
-10917,
-17624,
-28046,
-30346,
31968,
-31357,
-13275,
20477,
-24618,
12025,
-27004,
22683,
-26798,
27932,
-12941,
26237,
23928,
12628,
-21250,
-21256,
12698,
-1210,
13857,
8276,
-6210,
29195,
-1346,
-27208,
9054,
-13102,
8185,
16321,
-12191,
15279,
26982,
-17905,
-16747,
-28979,
19540,
-14277,
3424,
-27845,
-29608,
-1622,
20499,
11205,
8767,
-29453,
21768,
26232,
-2467,
22780,
-5349,
-14289,
-32558,
-11523,
27125,
2772,
-22504,
23280,
-23175,
-29315,
-16557,
-18838,
9600,
9851,
25883,
12283,
-20984,
-18298,
79,
14188,
16377,
-30105,
15907,
-24713,
-23281,
16769,
-13819,
27250,
-98,
27586,
-15397,
-8126,
828,
15160,
25617,
-16481,
-5413,
-6006,
-24438,
28739,
3749,
-9458,
-12226,
10252,
12413,
-18118,
29407,
-1884,
-19890,
-22996,
22285,
27599,
29834,
-24423,
-6045,
21701,
-23576,
-13622,
24895,
9730,
-3972,
-10940,
26497,
-3661,
7144,
-3465,
10847,
-20253,
22979,
3368,
27334,
25331,
-20963,
-9655,
12439,
-8661,
32495,
-1100,
15504,
-4600,
15502,
-26707,
-26799,
4832,
-22418,
31111,
-28235,
31101,
-28824,
-844,
16550,
19219,
21371,
29860,
-15307,
16877,
24643,
-23570,
1797,
-31903,
-12320,
-7752,
-12571,
-24939,
-26405,
21547,
-16891,
9893,
-4771,
-23398,
-26944,
1021,
10488,
32051,
29378,
10887,
31624,
19546,
4812,
4170,
18474,
-21857,
16502,
30622,
-28756,
-3327,
-18643,
14969,
-21388,
14322,
5716,
-15449,
-7277,
18162,
15231,
21623,
-17,
11364,
3716,
22678,
-13750,
-22092,
7385,
-21659,
14884,
-3441,
-32132,
-30959,
-25488,
-21984,
-25195,
-9670,
-23075,
-15669,
-5598,
-2648,
8158,
-2914,
-13403,
27240,
-17322,
6939,
-4903,
10595,
-26648,
-16535,
25301,
-26889,
13115,
-8419,
19671,
29360,
-18893,
-24416,
26103,
-13980,
13468,
-3128,
-2404,
-30455,
-4014,
-19267,
26230,
-23861,
31045,
27071,
-7531,
24816,
-20419,
-22202,
31049,
9974,
1736,
5059,
-2787,
-8773,
-3392,
-26656,
24159,
-25717,
-2354,
23152,
-2831,
-8132,
-31759,
-27737,
29808,
-18877,
15413,
31162,
17074,
-16930,
24454,
-12228,
1905,
-12684,
20309,
-11917,
30477,
-25324,
5673,
-23606,
-16824,
-26277,
30959,
3705,
-3217,
-22567,
-15512,
-27216,
220,
-1432,
-23545,
9277,
26481,
14066,
-115,
-1036,
-7446,
7891,
6086,
31416,
-24293,
975,
2245,
17514,
6288,
-4198,
2884,
-9983,
28647,
-26731,
9607,
11415,
-7264,
7066,
-31885,
32673,
11283,
-1651,
-25878,
18626,
-13980,
-9823,
31689,
-12742,
-16921,
20139,
-15613,
7041,
-7135,
14404,
-15453,
9919,
-19078,
16821,
-30617,
1403,
-13195,
-18678,
31714,
-8524,
9385,
-6652,
-7183,
7860,
1274,
-13209,
-17526,
8991,
27153,
-28216,
22938,
17341,
-1547,
-6532,
1960,
-14452,
22547,
-9779,
27589,
2836,
-11342,
26187,
-3278,
30978,
-14998,
-15947,
27507,
-18678,
29115,
948,
9661,
-410,
-25318,
29548,
-7646,
7319,
-7324,
-15137,
30435,
-20022,
-11213,
13712,
-7128,
-14573,
20931,
-547,
-14326,
-4810,
-11550,
22810,
-23074,
-145,
6027,
-29223,
6431,
-782,
-30619,
-8377,
-1827,
24130,
-1207,
9353,
-28932,
27064,
-13951,
-17041,
321,
-24041,
-28014,
-20047,
-28741,
3560,
-26601,
29413,
10760,
-1040,
29111,
-22264,
-21237,
-1827,
24170,
20198,
26372,
-8884,
22998,
20437,
28840,
-18999,
2406,
-11305,
-22754,
-8182,
29101,
5981,
21495,
-1709,
-26860,
-31442,
27083,
-27854,
-669,
-25381,
-19552,
-3684,
-24546,
-11038,
-13636,
-3623,
8593,
25939,
-1099,
-30430,
32551,
-9253,
16943,
-1440,
12156,
-12933,
20179,
-12120,
21836,
32615,
4989,
-13047,
3326,
11189,
20741,
-1883,
2806,
7760,
-15339,
-29359,
9215,
-28423,
16648,
21925,
-10575,
9674,
24512,
7383,
-29990,
-4604,
-16919,
-5571,
31995,
26188,
15293,
11242,
9729,
-1054,
3657,
-8628,
-927,
5279,
30276,
-17901,
-11292,
31244,
-9799,
-1686,
9665,
-28766,
-12266,
11667,
20199,
27952,
-17081,
-23797,
18858,
14035,
12950,
-25525,
16393,
-4598,
959,
13156,
9045,
-21829,
-655,
-28546,
-23908,
-12894,
-8522,
2987,
-17096,
32189,
31163,
-19309,
-11475,
654,
3764,
21400,
-3466,
7487,
32137,
-18296,
-21269,
-20198,
32233,
5453,
19664,
20507,
25157,
-3741,
26413,
9926,
149,
-27290,
-8345,
-20294,
-11797,
6140,
32292,
19297,
-7256,
-14979,
-14384,
18709,
-15710,
25365,
22402,
3697,
10579,
19266,
28,
-8305,
-26289,
15733,
-27794,
-12407,
13434,
32373,
-31674,
-30101,
-28763,
-11601,
5575,
3580,
-32007,
124,
-24092,
13415,
28253,
15844,
27593,
12920,
3632,
-12584,
8945,
29948,
268,
19817,
26620,
30993,
-2739,
-20457,
23600,
-20823,
11373,
17538,
13778,
-16611,
6517,
8384,
-26257,
31872,
27638,
14325,
-27380,
-22036,
27911,
31952,
-27464,
-13627,
12449,
5167,
-178,
-29482,
29086,
-7472,
-27480,
-6033,
-12862,
-13603,
-32111,
-29689,
-28265,
-16884,
-23044,
-17763,
24282,
-20577,
-241,
22231,
-27331,
-31808,
-14299,
-13304,
-18077,
-2861,
-4431,
16935,
19679,
4568,
30976,
-18693,
-30179,
-23673,
-23216,
-22431,
21460,
-10842,
2514,
-24104,
30290,
-25539,
-27557,
30416,
-23216,
-22303,
-11821,
13168,
4936,
18097,
-1121,
5647,
-13117,
3345,
-29839,
-8177,
6079,
-15170,
-10800,
20974,
32076,
-12462,
-25539,
5372,
6086,
-7694,
30457,
-10157,
-3164,
8657,
-28367,
-8811,
10193,
-25877,
7387,
-6703,
-21116,
9842,
-31999,
-3895,
-30488,
-27431,
3024,
13010,
21834,
-28099,
11822,
1};}
